<?php
	session_start();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
	<head>
  		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  		<link rel="stylesheet" media="screen" href="../generic/generic.css" />
  		<link rel="stylesheet" media="screen" href="confirm.css" />
		<link rel="icon" type="image/png" href="../content/images/favicon.ico" />
		
		<!--JQUERY-->
		<script language='JavaScript' src='../scripts/jquery-ui-1.8.6.custom/js/jquery-1.4.4.min.js'></script>
		<script language='JavaScript' src='../scripts/jquery-ui-1.8.6.custom/js/jquery-ui-1.8.6.custom.min.js'></script>
		<link rel="stylesheet" media="screen" type="text/css" title="style" href="../scripts/jquery-ui-1.8.6.custom/css/ui-darkness/jquery-ui-1.8.6.custom.css" />	
		
		<!--Autres scripts-->
		<script language='JavaScript' src='../scripts/generic.js'></script>
		<script language='JavaScript' src='../scripts/menu_manager.js'></script>
  		<title>
			Identificator - Confirmation
		</title>
	</head>
	<body onload="Hour();">
                <img id="image_fond" src="../content/images/background/fond.png" style="width:99%; height:99%;"/>
		<?php
			include_once(dirname(__FILE__). "/../generic/top.php");
			
			include_once(dirname(__FILE__). "/../core/presenters/subscription/class.Confirm_Presenter.php");
			$pres = new Confirm_Presenter();
			//echo $pres->getRegionList();
			$_SESSION['confirm_pres'] = serialize($pres);
		?>
		<script language='JavaScript'>
			InitHeader('../content/images/email-icon.png', "Un e-mail vous à été envoyé.", '', false);
		</script>
		 <div id="content">
			<div id="menu" class="menu">
				<img id="menuImg1" class="menuImg" src="../content/images/menus/fleche_accueil.png" onmouseover="javascript:itemMenuOver(this)" 
                                                                                                                    onmouseout="javascript:itemMenuOver(this)" 
                                                                                                                    style="cursor:pointer;"
                                                                                                                    onclick="javascript:window.location='../home.php'"/>
			
				<img id="menuImg2" class="menuImg" src="../content/images/menus/fleche_inscription.png" onmouseover="javascript:itemMenuOver(this)" 
                                                                                                                        onmouseout="javascript:itemMenuOver(this)" 
                                                                                                                        style="cursor:pointer;"
                                                                                                                        onclick="javascript:window.location='new_user.php'"/>
				<img id="menuImg3" class="menuImg" src="../content/images/menus/fleche_mail.png" onmouseover="javascript:itemMenuOver(this)" 
                                                                                                                onmouseout="javascript:itemMenuOver(this)" 
                                                                                                                style="cursor:pointer;"/>		
			</div>
			<div id="div_middle" class="div_middle">
				<span id='label_Info' class='label_Info'>
				<?php
					if(isset($_GET['envoi'])){
						echo "Un e-mail vous à été envoyé, cliquez sur le lien pour valider votre compte.";
					}
					else if(isset($_GET['confirm']))
					{
						$login = $pres->confirm($_GET['param'],$_GET['param2']);
						
						if($login != "_noLogin_"){
                                                    echo "Le profil ".$login." est maintenant actif.<br />";
                                                    echo "Vous allez être redirigé dans quelques secondes.";
                                                    echo "<script type='text/javascript'>self.setTimeout(\"self.location.href = '../home.php';\",'5000');</script>";
						}
						else{
                                                    echo "Un problème à eut lieu lors de la confirmation, contactez un administrateur.";
						}
					}
				?>
				</span><br />
				<span id="label_error" class="label_error"></span>
			</div>
		</div>
		<?php
			include_once(dirname(__FILE__). "/../generic/footer.php");
		?>
	</body>
</html>
